package com.zxl.yjb.http.api;


import com.zxl.yjb.app.update.CheckVersionBean;
import com.zxl.yjb.bean.AddressBookBean;
import com.zxl.yjb.bean.AddrsBean;
import com.zxl.yjb.bean.AreaBean;
import com.zxl.yjb.bean.BannerBean;
import com.zxl.yjb.bean.CanChatBean;
import com.zxl.yjb.bean.CommenBean;
import com.zxl.yjb.bean.CommentBean;
import com.zxl.yjb.bean.CouponBean;
import com.zxl.yjb.bean.DiscountAmountBean;
import com.zxl.yjb.bean.FileUploadBean;
import com.zxl.yjb.bean.HttpResult;
import com.zxl.yjb.bean.ImgBean;
import com.zxl.yjb.bean.IncomeListBean;
import com.zxl.yjb.bean.LoginBean;
import com.zxl.yjb.bean.LoginSucessBean;
import com.zxl.yjb.bean.MenuClassifyBean;
import com.zxl.yjb.bean.MyWalletBean;
import com.zxl.yjb.bean.NearbyHelpBean;
import com.zxl.yjb.bean.NewsBean;
import com.zxl.yjb.bean.NewsDetailBean;
import com.zxl.yjb.bean.OrderBean;
import com.zxl.yjb.bean.OrderBindBean;
import com.zxl.yjb.bean.OrderDetailBean;
import com.zxl.yjb.bean.OrderSendBean;
import com.zxl.yjb.bean.OrderTakeBean;
import com.zxl.yjb.bean.ReadStatusBean;
import com.zxl.yjb.bean.ReasonBean;
import com.zxl.yjb.bean.SOSHaveReadBean;
import com.zxl.yjb.bean.ShareMessageDetailBean;
import com.zxl.yjb.bean.ShareMessageResponseBean;
import com.zxl.yjb.bean.ShareMsgBean;
import com.zxl.yjb.bean.ShareMsgClassifyBean;
import com.zxl.yjb.bean.SkillClassifyBean;
import com.zxl.yjb.bean.SosDetailBean;
import com.zxl.yjb.bean.UserBean;
import com.zxl.yjb.bean.VoiceUploadBean;
import com.zxl.yjb.bean.WXOrderBean;
import com.zxl.yjb.bean.ZFBOrderBean;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Url;

/**
 * Created by Administrator on 2017/6/7.
 */

public interface ApiManager {

    /*//提交售后
    @POST("shopping/customerService/save")
    @FormUrlEncoded
    Observable<HttpResult<String>> customerService(@Field("timestamp") String timestamp, @Field("sign") String sign,
                                                   @Field("token") String token, @FieldMap Map<String, String> map);

    //获取开发票信息
    @GET("shopping/invoice/getInfo")
    Observable<HttpResult<InvoiceBean>> getInvoiceInfo(@Query("timestamp") String timestamp, @Query("sign") String sign,
                                                       @Query("token") String token, @QueryMap Map<String, String> map);*/

    //获取验证码
    @POST("user/code")
    @FormUrlEncoded
    Observable<HttpResult<String>> getCode(@FieldMap Map<String, String> map);

    //注册登录
    @POST("user/isreg")
    @FormUrlEncoded
    Observable<HttpResult<LoginBean>> isReg(@FieldMap Map<String, String> map);

    //注册登录
    @POST("user/reg4rytoken")
    @FormUrlEncoded
    Observable<HttpResult<LoginBean>> loignWithRtoken(@FieldMap Map<String, String> map);

    //获取banner
    @POST("app/getbanner")
    @FormUrlEncoded
    Observable<HttpResult<ArrayList<BannerBean>>> getBanner(@FieldMap Map<String, String> map);

    //获取分类菜单
    @POST("classify/getclassifyfist")
    @FormUrlEncoded
    Observable<HttpResult<ArrayList<MenuClassifyBean>>> getclassifyfist(@FieldMap Map<String, String> map);

     //获取技能分类和菜单
    @POST("classify/getclassify")
    @FormUrlEncoded
    Observable<HttpResult<ArrayList<SkillClassifyBean>>> getclassify(@FieldMap Map<String, String> map);

    //获取用户信息
    @POST("user/userinfo")
    @FormUrlEncoded
    Observable<HttpResult<LoginSucessBean>> getUserInfo(@Field("uid") String uid);
    //注册技能
    @POST("user/regskill")
    @FormUrlEncoded
    Observable<HttpResult<String>> regSkill(@FieldMap Map<String, String> map);

    //图片上传
    @POST("publicfun/uploadrimg")
    @FormUrlEncoded
    Observable<HttpResult<ImgBean>> uploadPictures(@Field("base64") String file);
   /* @Multipart
    @POST("publicfun/uploadrimg")
    Observable<HttpResult<List<String>>> uploadPictures(@Part MultipartBody.Part... files);*/

    //1、 修改呢称
    @POST("user/xgnickname")
    @FormUrlEncoded
    Observable<HttpResult<Object>> xgNickName(@Field("nickname") String nickName);

    //1、 修改生日
    @POST("user/xgbirthday")
    @FormUrlEncoded
    Observable<HttpResult<Object>> xgBirthday(@Field("birthday") String birthday);

    //1、 修改头像
    @POST("user/xgfaceimg")
    @FormUrlEncoded
    Observable<HttpResult<Object>> xgFaceimg(@Field("faceimg") String faceImg);

    //1、 修改性别
    @POST("user/xgsex")
    @FormUrlEncoded
    Observable<HttpResult<Object>> xgGender(@Field("sex") String gender);


    //发单列表
    @POST("order/yflists")
    @FormUrlEncoded
    Observable<HttpResult<ArrayList<OrderSendBean>>> yflists(@FieldMap Map<String, String> map);

    //接单列表
    @POST("order/yjlists")
    @FormUrlEncoded
    Observable<HttpResult<ArrayList<OrderTakeBean>>> yjlists(@FieldMap Map<String, String> map);

    //接单位置
    @POST("user/reglocation")
    @FormUrlEncoded
    Observable<HttpResult<String>> reglocation(@FieldMap Map<String, String> map);

    //本地要闻
    @POST("news/lists")
    @FormUrlEncoded
    Observable<HttpResult<ArrayList<NewsBean>>> newsList(@FieldMap Map<String, String> map);

    //要闻详情
    @POST("news/deal")
    @FormUrlEncoded
    Observable<HttpResult<NewsDetailBean>> newseal(@FieldMap Map<String, String> map);

    //共享信息菜单
    @POST("topic/getclassify")
    @FormUrlEncoded
    Observable<HttpResult<ArrayList<ShareMsgClassifyBean>>> shareMsgClassify(@FieldMap Map<String, String> map);

    //共享信息列表
    @POST("topic/clalist")
    @FormUrlEncoded
    Observable<HttpResult<ArrayList<ShareMsgBean>>> getClaList(@FieldMap Map<String, String> map);

    //共享信息列表
    @POST("topic/clalist_by_distance")
    @FormUrlEncoded
    Observable<HttpResult<ArrayList<ShareMsgBean>>> getSharemsgList(@FieldMap Map<String, String> map);

    //发单
    @POST("order/add")
    @FormUrlEncoded
    Observable<HttpResult<OrderBean>> createOrder(@FieldMap Map<String, String> map);

    //sos求助
//    @POST("sos/index")
    @POST("sos/sossend")
    @FormUrlEncoded
    Observable<HttpResult<Object>> sosHelp(@FieldMap Map<String, String> map);

    //sos求助列表
    @POST("sos/soslist")
    @FormUrlEncoded
    Observable<HttpResult<List<NearbyHelpBean>>> sosList(@FieldMap Map<String, String> map);



    //好友黑名单
    @POST("user/relationperson_list")
    @FormUrlEncoded
    Observable<HttpResult<List<UserBean>>> friendsList(@FieldMap Map<String, String> map);

    //好友黑名单
    @POST("user/relationperson_skillid_list")
    @FormUrlEncoded
    Observable<HttpResult<List<UserBean>>> friendsSkillList(@FieldMap Map<String, String> map);

    //移除好友或黑名单
    @POST("user/relationperson_del")
    @FormUrlEncoded
    Observable<HttpResult<Object>> deletefriend(@Field("id") String id);

    //添加好友或黑名单
    @POST("user/relationperson_add")
    @FormUrlEncoded
    Observable<HttpResult<Object>> addFriend(@FieldMap Map<String, String> map);

    //获取别人对我的评论
    @POST("user/evaluate_other2me_list")
    @FormUrlEncoded
    Observable<HttpResult<List<CommenBean>>> getCommenList(@FieldMap Map<String, String> map);

    //获取评论
    @POST("user/evaluate_other2uid_list")
    @FormUrlEncoded
    Observable<HttpResult<CommentBean>> evaluate_other2uid_list(@FieldMap Map<String, String> map);

    //发布评论
    @POST("user/evaluate_add")
    @FormUrlEncoded
    Observable<HttpResult<Object>> evaluate(@FieldMap Map<String, String> map);


    //我的收入明细
    @POST("user/mx")
    @FormUrlEncoded
    Observable<HttpResult<List<MyWalletBean>>> incomeDetails(@FieldMap Map<String, String> map);


    //我优惠券
    @POST("user/voucher_list")
    @FormUrlEncoded
    Observable<HttpResult<CouponBean>> voucherList(@Field("") String i);

    //我的提现列表
    @POST("user/txlist")
    @FormUrlEncoded
    Observable<HttpResult<List<MyWalletBean>>> withdrawList(@FieldMap Map<String, String> map);

    //提现
    @POST("user/tx")
    @FormUrlEncoded
    Observable<HttpResult<Object>> withdrawals(@FieldMap Map<String, String> map);

    //订单详情
    @POST("order/getorder")
    @FormUrlEncoded
    Observable<HttpResult<OrderDetailBean>> orderDetail(@FieldMap Map<String, String> map);


    //订单详情
    @POST("sos/sosdetail")
    @FormUrlEncoded
    Observable<HttpResult<SosDetailBean>> sosDetail(@FieldMap Map<String, String> map);


    //语音文件上传
    @Multipart
    @POST("news/yyuploder")
    Observable<HttpResult<VoiceUploadBean>> uploadVoice(@Part MultipartBody.Part... files);


    //多张图片上传
    @Multipart
    @POST("news/file_upload_multi")
    Observable<HttpResult<FileUploadBean>> uploadMultiPicture(@Part MultipartBody.Part... files);

    //发布天数、折扣、对应价格
    @POST("topic/get_fee_discount_amount")
    @FormUrlEncoded
    Observable<HttpResult<ArrayList<DiscountAmountBean>>> getFeeDiscountAmount(@FieldMap Map<String, String> map);
    //支付宝支付
    @POST("order/pay")
    @FormUrlEncoded
    Observable<HttpResult<ZFBOrderBean>> payZFB(@FieldMap Map<String, String> map);

    //微信支付
    @POST("order/pay")
    @FormUrlEncoded
    Observable<HttpResult<WXOrderBean>> payWX(@FieldMap Map<String, String> map);

    //绑定订单到好友
    @POST("news/chat_uid_ordersn_add")
    @FormUrlEncoded
    Observable<HttpResult<Object>> bindOrderToUser(@FieldMap Map<String, String> map);


    //订单完成
    @POST("order/confirm")
    @FormUrlEncoded
    Observable<HttpResult<Object>> orderConfirm(@FieldMap Map<String, String> map);

    //撤单
    @POST("order/cancelororder")
    @FormUrlEncoded
    Observable<HttpResult<Object>> cancelororder(@FieldMap Map<String, String> map);

    //获取撤单原因
    @GET("order/getreason")
    Observable<HttpResult<List<ReasonBean>>> getreason();


    //查询与某人所有订单
    @POST("news/chat_uid_ordersn_list")
    @FormUrlEncoded
    Observable<HttpResult<List<OrderBindBean>>> getOrderListForUser(@FieldMap Map<String, String> map);

    //接单
    @POST("order/accept")
    @FormUrlEncoded
    Observable<HttpResult<Object>> accept(@FieldMap Map<String, String> map);

    //发布共享信息
    @POST("topic/release")
    @FormUrlEncoded
    Observable<HttpResult<ShareMessageResponseBean>> publishShareMessage(@FieldMap Map<String, String> map);

    //共享信息详情
    @POST("topic/deal")
    @FormUrlEncoded
    Observable<HttpResult<ShareMessageDetailBean>> getMessageDetail(@FieldMap Map<String, String> map);

    //添加收藏
    @POST("topic/setcollection")
    @FormUrlEncoded
    Observable<HttpResult<Object>> setCollection(@FieldMap Map<String, String> map);

    //删除历史共享信息
    @POST("topic/delcollection")
    @FormUrlEncoded
    Observable<HttpResult<Object>> delCollection(@FieldMap Map<String, String> map);


    //收藏列表
    @POST("topic/getcollection")
    @FormUrlEncoded
    Observable<HttpResult<ArrayList<ShareMsgBean>>> getCollection(@FieldMap Map<String, String> map);

    //历史提问列表
    @POST("topic/clalistme")
    @FormUrlEncoded
    Observable<HttpResult<ArrayList<ShareMsgBean>>> getHistory(@FieldMap Map<String, String> map);

    //历史提问列表
    @POST("order/get_around4skill")
    @FormUrlEncoded
    Observable<HttpResult<List<UserBean>>> getAround4skill(@FieldMap Map<String, String> map);

    //订单列表已读未读状态
    @POST("order/orderlist_read_get_status")
    @FormUrlEncoded
    Observable<HttpResult<ReadStatusBean>> orderlist_read_get_status(@FieldMap Map<String, String> map);

    //发单列表已读未读状态
    @POST("order/orderlist_request_read_get_status")
    @FormUrlEncoded
    Observable<HttpResult<ReadStatusBean>> orderlist_request_read_get_status(@FieldMap Map<String, String> map);

    //首页发单接单已读未读状态
    @POST("order/orderlist_mainpage_read_status")
    @FormUrlEncoded
    Observable<HttpResult<ReadStatusBean>> orderlist_mainpage_read_status(@FieldMap Map<String, String> map);

    //获取未操作的订列表
    @POST("order/order_accept1refuse2_page_state")
    @FormUrlEncoded
    Observable<HttpResult<ArrayList<OrderTakeBean>>> order_accept1refuse2_page_state(@FieldMap Map<String, String> map);

    //消息免打扰
    @POST("user/set_no_receive_order_jpush")
    @FormUrlEncoded
    Observable<HttpResult<Object>> set_no_receive_order_jpush(@FieldMap Map<String, String> map);

    //上传更新照片墙
    @POST("user/photowall_add_update")
    @FormUrlEncoded
    Observable<HttpResult<Object>> photowall_add_update(@FieldMap Map<String, String> map);

    //请求照片墙
    @POST("user/photowall_list")
    @FormUrlEncoded
    Observable<HttpResult<ArrayList<String>>> photowall_list(@FieldMap Map<String, String> map);

    //查询是否可以聊天
    @POST("news/canRYChat")
    @FormUrlEncoded
    Observable<HttpResult<CanChatBean>> canRYChat(@FieldMap Map<String, String> map);

    //查询可提现金额
    @POST("user/incomeList")
    @FormUrlEncoded
    Observable<HttpResult<IncomeListBean>> incomeList(@FieldMap Map<String, String> map);

    //版本更新
    @POST("config/getNewVersion")
    @FormUrlEncoded
    Observable<HttpResult<CheckVersionBean>> getNewVersion(@FieldMap Map<String, String> map);

    //删除历史共享信息
    @POST("topic/delHistory")
    @FormUrlEncoded
    Observable<HttpResult<Object>> delHistory(@FieldMap Map<String, String> map);

    //删除失效单
    @POST("order/del_invalidOrder")
    @FormUrlEncoded
    Observable<HttpResult<Object>> del_invalidOrder(@FieldMap Map<String, String> map);

    //sos是否未读
    @POST("sos/sosHaveNoRead")
    @FormUrlEncoded
    Observable<HttpResult<SOSHaveReadBean>> sosHaveNoRead(@FieldMap Map<String, String> map);

    //获取省份列表
    @POST("topic/getAreaAllProvince")
    @FormUrlEncoded
    Observable<HttpResult<List<AreaBean>>> getAreaAllProvince(@FieldMap Map<String, String> map);

    //子级联列表
    @POST("topic/getAreaNextlevel")
    @FormUrlEncoded
    Observable<HttpResult<List<AreaBean>>> selectNationalByPid(@FieldMap Map<String, String> map);

    //免费发布接口
    @POST("topic/freeTopicAction")
    @FormUrlEncoded
    Observable<HttpResult<Object>> freeTopicAction(@FieldMap Map<String, String> map);

    //删除SOS
    @POST("sos/sosdel")
    @FormUrlEncoded
    Observable<HttpResult<Object>> sosdel(@FieldMap Map<String, String> map);

    //删除SOS
    @POST("user/addressBook_list")
    @FormUrlEncoded
    Observable<HttpResult<AddressBookBean>> addressBook_list(@FieldMap Map<String, String> map);

    //删除SOS
    @POST("user/addressBook_add")
    @FormUrlEncoded
    Observable<HttpResult<Object>> addressBook_add(@FieldMap Map<String, String> map);

    //删除SOS
    @POST("user/addressBook_update")
    @FormUrlEncoded
    Observable<HttpResult<Object>>  addressBook_update(@FieldMap Map<String, String> map);

    //删除SOS
    @POST("user/addressBook_del")
    @FormUrlEncoded
    Observable<HttpResult<Object>> addressBook_del(@FieldMap Map<String, String> map);

    //删除SOS
    @POST("news/suggest_send")
    @FormUrlEncoded
    Observable<HttpResult<Object>> suggest_send(@FieldMap Map<String, String> map);

    //删除SOS
    @POST("sos/soslist_my")
    @FormUrlEncoded
    Observable<HttpResult<List<NearbyHelpBean>>> soslist_my(@FieldMap Map<String, String> map);

    //删除SOS
    @POST("user/idCard_add")
    @FormUrlEncoded
    Observable<HttpResult<Object>> addIdCard(@FieldMap Map<String, String> map);


    @GET
    Observable<AddrsBean> getAllProvince(@Url String url);

}

